<article class="page-container">
	<form class="layui-form" method="post" action="<{:url('inshou/add')}>">
	  <div class="layui-form-item">
	    <label class="layui-form-label">收款时间</label>
	    <div class="layui-input-block">
      		<input class="layui-input" id="min_time" type="text" name="shou_time" required  lay-verify="required" placeholder="请选择收款时间" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">收款币种</label>
	    <div class="layui-input-block">
					<select name="type" required  lay-verify="required" class="select">
							<option value=""></option>
				          <{volist name="type" id="v"}>
				              <option value="<{$key}>"><{$v}></option>
				          <{/volist}>
					</select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">选择客户</label>
	    <div class="layui-input-block">
					<select name="customer_id" required  lay-verify="required" class="select">
							<option value="100all">无客户</option>
				          <{volist name="customer" id="v"}>
				              <option value="<{$v['id']}>"><{$v['name']}></option>
				          <{/volist}>
					</select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">收款金额</label>
	    <div class="layui-input-block">
      		<input class="layui-input" type="text" name="money" required  lay-verify="required" placeholder="￥" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">汇率</label>
	    <div class="layui-input-block">
      		<input class="layui-input" type="text" name="rate" placeholder="请输入汇率" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">人民币</label>
	    <div class="layui-input-block">
      		<input class="layui-input" type="text" style="background:#f4f4f4;" readonly="readonly"  name="rmb" placeholder="￥" value="">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">备注</label>
	    <div class="layui-input-block">
      		 <textarea name="note" placeholder="请输入内容" class="layui-textarea"></textarea>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit lay-filter="form">提交</button>
	    </div>
	  </div>
	</form>
</article>
<script>
$().ready(function(){
	$("[name='rate']").blur(function(){
		var money = $("[name='money']").val();
		var rate = $("[name='rate']").val();
		if(money!='' && !isNaN(money) && rate!='' && !isNaN(rate)){
			var rmb = money*rate;
			$("[name='rmb']").val(rmb.toFixed(2));
		}
	});
});
</script>